package com.mbschenkel.client;


import java.io.Serializable;

import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
import com.mbschenkel.client.SnippetList;

public class SnippetStruct implements Serializable {
	public int id = -1;
	public String url = "";
	public String command = "\\nothing";
	public boolean tryReload = false;
	public String jobID = null; // if render is in progress
	
	public String getHTML() { 
		//HorizontalPanel panel = new HorizontalPanel();
		//HTML panel = new HTML();
		//panel.setWidth("100%");
		//panel.setStyleName("mbsFramed");
		if( !tryReload ) {  // TODO was: url != "" ) {
			return ("<div class='mbsSnippetImgContainer'><img src='"+url+"'></div> "+command);
		} else { 
			return (command+" [preview beeing rendered]");
		}
	    //DecoratorPanel decPanel = new DecoratorPanel();
		//decPanel.setWidth("100%");
	    //decPanel.setWidget(panel);
		//return panel;
	}
}


